{extend name="common/common"/}

{block name="content-header"}
<h1>
    编辑分类目录
    <small>Optional description</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
    <li class="active">Here</li>
</ol>
{/block}

{block name="content"}
<div class="row">
    <div class="col-xs-12">

        <form class="am-form am-form-horizontal" action="{:url('update')}">
            <br>
            <div class="am-form-group">
                <label class="am-u-sm-3 am-form-label">名称</label>
                <div class="am-u-sm-9">
                    <input type="text" name="name" value="{$row.name}" placeholder="名称">
                    <small>这将是它在站点上显示的名字。</small>
                </div>
            </div>

            <div class="am-form-group">
                <label for="pid" class="am-u-sm-3 am-form-label">父级分类</label>
                <div class="am-u-sm-9">
                    <select name="pid" id="pid" data-am-selected="{btnSize: 'sm'}">
                        <option value="0">无</option>
                        {volist name="p_cates" id="v"}
                        <option value="{$v.id}" {if condition="$v['id'] eq $row['pid']"}selected{/if}>{$v.name}</option>
                        {/volist}
                    </select>
                </div>
            </div>

            <div class="am-form-group">
                <div class="am-u-sm-9 am-u-sm-push-3">
                    <button type="button" class="am-btn am-btn-primary">保存修改</button>
                </div>
            </div>
        </form>


    </div>
</div>
{/block}